package com.qkl.upload.publics.jobs;


import com.qkl.upload.publics.service.UploadFileService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


@Component
@EnableScheduling
@Slf4j
public class AppJob {

    @Autowired
    private UploadFileService uploadFileService;


    /**
     * 删除查料台过期文件每天零晨 3 点执行
     */
    @Scheduled(cron = "0 0 3 * * ?")
    public void deleteCheckExpireVideo(){
        uploadFileService.deleteCheckExpireVideo();
    }

}
